home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / how to learn assembler.adf / CH4 / 4_1B.asm < prev    next >
Assembly Source File  |  1988-02-25  |  396b  |  15 lines

  1. ;(6.4B)
  2. adding1:
  3.      clr.l    D0        ; Erase D0
  4.      move.l   #table,a0 ; Put the address of table in A0
  5.      move     0(a0),d0  ; Put first entry in D0
  6.      add      2(a0),d0  ; Add second entry
  7.      add      4(a0),d0  ; Add third entry
  8.      add      6(a0),d0  ; Add fourth entry
  9.      add      8(a0),d0  ; Add fifth entry
  10.      rts                ; return
  11.  
  12. table:  dc.w  2,4,6,8,10
  13.  
  14.      end
  15.